home *** CD-ROM | disk | FTP | other *** search
/ American History: Interactive Maps & User's Guide / American History: Interactive Maps & User's Guide.iso / pc / logon.dxr / 00025_floppycheck script.ls < prev    next >
Encoding:
Text File  |  2000-01-25  |  2.3 KB  |  74 lines

  1. on enterFrame
  2.   global gCheckFloppyFlag, gDataPath, gDelimiter, gFloppyPath, gInitPath, gTeacherCD, gDatabaseExists, gFolderName, gFileName, gClassFloat, gClassCount, gCurrentComponent, gInText, gIntLastComponent
  3.   case gCheckFloppyFlag of
  4.     (-999):
  5.       if readText(gInitPath) <> 0 then
  6.         set returncode to -1
  7.       end if
  8.       if returncode = 0 then
  9.         if gTeacherCD = 0 then
  10.           case gDatabaseExists of
  11.             0:
  12.               if the platform contains "Windows" then
  13.                 set gDataPath to "A:"
  14.               else
  15.                 set gDataPath to floppyName()
  16.               end if
  17.               set floppyfoundflag to verifyFloppy(gDataPath & gDelimiter, 0)
  18.               if floppyfoundflag = 1 then
  19.                 set gDataPath to gDataPath & gDelimiter & "EAPScore" & gDelimiter
  20.                 set floppyfoundflag to verifyFloppy(gDataPath & "Class" & gDelimiter & "Token", 1)
  21.               end if
  22.               if floppyfoundflag = 0 then
  23.                 set returncode to -3
  24.               end if
  25.             1:
  26.               set gDataPath to line 2 of gInText & "eapscore" & gDelimiter
  27.           end case
  28.           set gFolderName to "Class"
  29.           set gFileName to "Token"
  30.           readText(gDataPath)
  31.           if readText(gDataPath) <> 0 then
  32.             set returncode to -2
  33.           else
  34.             set classToken to EMPTY
  35.             set tokenLine to gInText
  36.             do("set classToken = " & tokenLine)
  37.             set gClassFloat to integer(getAt(classToken, 1))
  38.             set gClassCount to integer(getAt(classToken, 2))
  39.           end if
  40.         end if
  41.         if returncode = 0 then
  42.           loadClass()
  43.           repeat with counter = 44 to 48
  44.             set the visible of sprite counter to 0
  45.           end repeat
  46.           initializePassword()
  47.           puppetSprite(43, 1)
  48.           swapCast(43, "RemoveCoverup")
  49.         end if
  50.       end if
  51.       if returncode <> 0 then
  52.         set gCurrentComponent to gIntLastComponent
  53.         forget(logonWindow)
  54.       else
  55.         go("Class List")
  56.       end if
  57.     0:
  58.       set gCheckFloppyFlag to -999
  59.     1, 9:
  60.       set gCheckFloppyFlag to 0
  61.     18, 27:
  62.       set gCheckFloppyFlag to -999
  63.     36, 45:
  64.       set gCheckFloppyFlag to -999
  65.     otherwise:
  66.       set gCheckFloppyFlag to gCheckFloppyFlag - 1
  67.       go(the frame)
  68.   end case
  69. end
  70.  
  71. on exitFrame
  72.   go(the frame)
  73. end
  74.